# 异常
from pathlib import Path

path = Path('pi_digits.txt')
contents = ''
try:
    contents = path.read_text()
except FileNotFoundError:
    print("文件未找到，请检查文件路径。")
else:
    print(contents)
    